﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using System.Windows.Input;
using log4net;
using System.Reflection;

namespace ViewModel.Test
{
    public class TestViewModel: ViewModelBase
    {
        public TestViewModel()
        {
            TestModelList = new List<TestModel>
            {
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                },
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                },
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                },
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                },
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                },
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                },
                new TestModel
                {
                    PropertyA="PropertyA1",
                    PropertyB="PropertyB1",
                    PropertyC="PropertyC1",
                    PropertyD="PropertyD1",
                    PropertyE="PropertyE1"
                }
            };
        }
        private IEnumerable<TestModel> m_TestModelList;

        public IEnumerable<TestModel> TestModelList
        {
            get { return m_TestModelList; }
            set { m_TestModelList = value; RaisePropertyChanged(() => TestModelList); }
        }

    }

    public class TestModel
    {
        public string PropertyA { get; set; }
        public string PropertyB { get; set; }
        public string PropertyC { get; set; }
        public string PropertyD { get; set; }
        public string PropertyE { get; set; }

    }
}
